libportal_dep = [ dependency('libportal'), dependency('libportal-gtk4') ]

deps = [
  dependency('glib-2.0'),
  dependency('gee-0.8', version: '>=0.8.5'),
  dependency('gtk4'),
  dependency('sqlite3'),
  dependency('libadwaita-1'),
  dependency('webkitgtk-6.0'),
  dependency('granite-7'),
  dependency('json-glib-1.0'),
  dependency('libecal-2.0', version: '>= 3.45.1'),
  dependency('libedataserver-1.2', version: '>= 3.45.1'),
  dependency('libical-glib'),
  libportal_dep,
  meson.get_compiler('c').find_library('m', required : false)
]

sources = files(
  'App.vala',
  'MainWindow.vala',
  'Util.vala',
  'Enum.vala',

  'Services/Database.vala',
  'Services/EventBus.vala',
  'Services/Todoist.vala',
  'Services/GoogleTasks.vala',
  'Services/ActionManager.vala',
  'Services/Notification.vala',
  'Services/TimeMonitor.vala',
  'Services/Settings.vala',
  'Services/DBusServer.vala',

  'Services/CalendarEvents/CalendarEvents.vala',
  'Services/CalendarEvents/DateIterator.vala',
  'Services/CalendarEvents/DateRange.vala',
  'Services/CalendarEvents/Util.vala',

  'Layouts/Sidebar.vala',
  'Layouts/FilterPaneRow.vala',
  'Layouts/HeaderItem.vala',
  'Layouts/ProjectRow.vala',
  'Layouts/SectionRow.vala',
  'Layouts/ItemRow.vala',
  'Layouts/LabelRow.vala',
  'Layouts/SectionBoard.vala',
  'Layouts/ItemBoard.vala',
  
  'Widgets/DynamicIcon.vala',
  'Widgets/ColorPickerRow.vala',
  'Widgets/LoadingButton.vala',
  'Widgets/CircularProgressBar.vala',
  'Widgets/MagicButton.vala',
  'Widgets/FilterHeader.vala',
  'Widgets/ProjectHeader.vala',
  'Widgets/EditableLabel.vala',
  'Widgets/Entries.vala',
  'Widgets/Placeholder.vala',
  'Widgets/SyncButton.vala',
  'Widgets/ScheduleButton.vala',
  'Widgets/PriorityButton.vala',
  'Widgets/ItemSummary.vala',
  'Widgets/PinButton.vala',
  'Widgets/LabelButton.vala',
  'Widgets/ItemLabels.vala',
  'Widgets/ItemLabelChild.vala',
  'Widgets/ProjectViewHeaderBar.vala',
  'Widgets/IconColorProject.vala',
  'Widgets/LabelsHeader.vala',
  'Widgets/ReminderButton.vala',
  'Widgets/MultiSelectToolbar.vala',
  'Widgets/EventsList.vala',
  'Widgets/EventRow.vala',
  'Widgets/CalendarSourceRow.vala',
  'Widgets/SettingsHeader.vala',
  'Widgets/SubItems.vala',
  'Widgets/LabelChild.vala',
  'Widgets/LabelsSummary.vala',
  'Widgets/SectionsOrderPopover.vala',

  'Widgets/Calendar/Calendar.vala',
  'Widgets/Calendar/CalendarDay.vala',
  'Widgets/Calendar/CalendarHeader.vala',
  'Widgets/Calendar/CalendarView.vala',
  'Widgets/Calendar/CalendarWeek.vala',

  'Widgets/DateTimePicker/DateTimePicker.vala',
  'Widgets/DateTimePicker/TimePicker.vala',

  'Widgets/LabelPicker/LabelPicker.vala',
  'Widgets/LabelPicker/LabelRow.vala',

  'Widgets/ReminderPicker/ReminderPicker.vala',
  'Widgets/ReminderPicker/ReminderRow.vala',
  
  'Widgets/ContextMenu/MenuItem.vala',
  'Widgets/ContextMenu/MenuSeparator.vala',
  'Widgets/ContextMenu/MenuItemPicker.vala',

  'Views/Project.vala',
  'Views/List.vala',
  'Views/Board.vala',
  'Views/Date.vala',
  'Views/Today.vala',
  'Views/Pinboard.vala',
  'Views/Label.vala',
  'Views/Filter.vala',
  'Views/Filters.vala',
  
  'Views/Scheduled/Scheduled.vala',
  'Views/Scheduled/ScheduledDay.vala',
  'Views/Scheduled/ScheduledRange.vala',
  'Views/Scheduled/ScheduledMonth.vala',

  'Objects/BaseObject.vala',
  'Objects/Color.vala',
  'Objects/DueDate.vala',
  'Objects/Item.vala',
  'Objects/ItemLabel.vala',
  'Objects/Label.vala',
  'Objects/Project.vala',
  'Objects/Queue.vala',
  'Objects/Reminder.vala',
  'Objects/Section.vala',
  
  'Objects/Filters/Pinboard.vala',
  'Objects/Filters/Scheduled.vala',
  'Objects/Filters/Today.vala',
  'Objects/Filters/Priority.vala',
  'Objects/Filters/Completed.vala',
  'Objects/Filters/Labels.vala',

  'Models/ItemList.vala',

  'Dialogs/Project.vala',
  'Dialogs/Label.vala',
  'Dialogs/Item.vala',
  'Dialogs/TodoistOAuth.vala',
  'Dialogs/GoogleOAuth.vala',
  'Dialogs/WhatsNew.vala',
  'Dialogs/ProjectDescription.vala',
  'Dialogs/ManageSectionOrder.vala',
  'Dialogs/ProjectPicker/ProjectPicker.vala',
  'Dialogs/ProjectPicker/ProjectPickerRow.vala',
  'Dialogs/ProjectPicker/SectionPickerRow.vala',

  'Dialogs/DatePicker.vala',
  'Dialogs/LabelPicker.vala',
  'Dialogs/RepeatConfig.vala',
  
  'Dialogs/QuickFind/QuickFind.vala',
  'Dialogs/QuickFind/QuickFindItem.vala',
  'Dialogs/QuickFind/Synapse.vala',

  'Dialogs/Preferences/PreferencesWindow.vala',
)

executable(
  meson.project_name(),
  sources,
  asresources,
  config_file,
  dependencies: deps,
  install: true
)
